package cn.sumpu.app.coolsk.domain;

import java.io.Serializable;
import java.util.Date;
import cn.sumpu.app.coolsk.constant.Table;

public class Syslog implements Serializable {

	private static final long serialVersionUID = -1093082236397253208L;

	public Syslog(){ }
	public Syslog(String username, String realname, String actionType, String tblName, String tblId){
		this.username = username;
		this.realname = realname;
		this.actionType = actionType;
		this.tblName = tblName;
		this.tblId = tblId;
	}
	
	private String id;
	private String username;
	private String realname;
	private String actionType;
	private String tblName;
	private String tblId;
	private Date gmtCreated;
	private Date gmtModified;
	
	public static final String insert = "增加";
	public static final String delete = "删除";
	public static final String update = "修改";
	public static final String select = "查询";
	
	public String getActionType() {
		return actionType;
	}
	public void setActionType(String actionType) {
		this.actionType = actionType;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	public String getTblName() {
		return tblName;
	}
	public void setTblName(String tblName) {
		this.tblName = tblName;
	}
	public String getTblId() {
		return tblId;
	}
	public void setTblId(String tblId) {
		this.tblId = tblId;
	}
	public Date getGmtCreated() {
		return gmtCreated;
	}
	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}
	public Date getGmtModified() {
		return gmtModified;
	}
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	public String getActionObject(){
		if(Table.SCENIC.equals(tblName)){
			return "景区";
		}else if(Table.TICKET.equals(tblName)){
			return "门票";
		}else if(Table.HOTEL.equals(tblName)){
			return "酒店";
		}else if(Table.ROOM.equals(tblName)){
			return "房间";
		}else if(Table.ORDER.equals(tblName)){
			return "订单（发传真）";
		}else if(Table.PRODUCT.equals(tblName)){
			return "产品";
		}else if(Table.TEMPLATE.equals(tblName)){
			return "模板";
		}else if(Table.CONFIG.equals(tblName)){
			return "设置";
		}else if(Table.COMPANY.equals(tblName)){
			return "公司";
		}else if(Table.INFO.equals(tblName)){
			return "信息";
		}else if(Table.CONTENT.equals(tblName)){
			return "内容";
		}else if(Table.CHANNEL.equals(tblName)){
			return "频道";
		}else if(Table.DISCUSS.equals(tblName)){
			return "点评";
		}else{
			return "";
		}
	}
	
}
